package com.aaa.three.controller;

import com.aaa.three.mapper.PersonalInfoMapper;
import com.aaa.three.pojo.domain.ChangePassword;
import com.aaa.three.pojo.domain.UserRegister;
import com.aaa.three.pojo.query.PersonalQueryy;
import com.aaa.three.result.AjaxResult;
import com.aaa.three.service.PersonalInfoService;
import com.aaa.three.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:lyq
 * @Date:2022/2/1415:19
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("login")
    public AjaxResult login(String username,String password,String telephone){
        return userService.login(username,password,telephone);
    }
    @RequestMapping("getInfo")
    public AjaxResult getInfo(){
        return userService.getInfo();
    }

    @RequestMapping("sendCode")
    public AjaxResult sendCode(String telephone){
        return userService.sendCode(telephone);
    }
    @RequestMapping("register")
    public AjaxResult register(UserRegister userRegister){
        return userService.register(userRegister);
    }


    @RequestMapping("changePassword")
    public AjaxResult changePassword(ChangePassword changePassword){
        return userService.changePassword(changePassword);
    }

    @RequestMapping("out")
    public AjaxResult out(){
        return userService.out();
    }

    @RequestMapping("updatePassword")
    public AjaxResult updatePassword(String telephone,String password){
        return userService.updatePassword(telephone,password);
    }

    @RequestMapping("nnbl")
    public AjaxResult nnbl(){
        return userService.nnbl();
    }



}
